import request from '/@/utils/request'
// 查询设备数据列表
export function listSensorDataLog(query:object) {
  return request({
    url: '/api/v1/system/sensorDataLog/list',
    method: 'get',
    params: query
  })
}
// 查询设备数据详细
export function getSensorDataLog(id:number) {
  return request({
    url: '/api/v1/system/sensorDataLog/get',
    method: 'get',
    params: {
      id: id.toString()
    }
  })
}
// 新增设备数据
export function addSensorDataLog(data:object) {
  return request({
    url: '/api/v1/system/sensorDataLog/add',
    method: 'post',
    data: data
  })
}
// 修改设备数据
export function updateSensorDataLog(data:object) {
  return request({
    url: '/api/v1/system/sensorDataLog/edit',
    method: 'put',
    data: data
  })
}
// 删除设备数据
export function delSensorDataLog(ids:number[]) {
  return request({
    url: '/api/v1/system/sensorDataLog/delete',
    method: 'delete',
    data:{
      ids:ids
    }
  })
}
// 关联sensors表选项
export function listSensors(query:object){
   return request({
     url: '/api/v1/system/sensors/list',
     method: 'get',
     params: query
   })
}
